﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using My_TV_Manager.Model;
using My_TV_Manager.View.MenuBar;
using My_TV_Manager.View.ContentPanel.Track;

namespace My_TV_Manager.View.ContentPanel
{
    [System.ComponentModel.DesignerCategory("")]

    public class TrackTab : InnerTabbedContainer
    {
        private Controller controller;

        // Constructor using controller for program data
        public TrackTab(Size size, int color, Controller controller)
            : base(size)
        {
            this.controller = controller;

            // Name the tabs and initialize new panel for each tab
            var buttons = new List<string>()
            {
                "Tracked Series",
                "Search"
            };
            
            // Add the content panels which correspond to the inner menubar
            contentPanels.Add(new TrackSeriesPanel(this.Panel2.ClientSize,
                                                   Settings.Colors.Get(color),
                                                   controller));
            contentPanels.Add(new TrackSearchPanel(this.Panel2.ClientSize,
                                                   Settings.Colors.Get(color),
                                                   controller));
            this.Panel2.Controls.Add(contentPanels[0]);

            // Initialize the menu bar with the new menu options
            innerMenuBar = new InnerMenuBar(this,
                                            this.Panel1.ClientSize,
                                            buttons,
                                            color);
            this.Panel1.Controls.Add(innerMenuBar);
        }
    }
}
